package uk.ac.nott.cs.g53dia;
/**
 * A container for one or more eggs laid by a bee.
 *
 * @author Neil Madden
 * @author Brian Logan
  */
/*
 * Copyright (c) 2005 Neil Madden (nem@cs.nott.ac.uk).
 * 
 * See the file "license.terms" for information on usage and redistribution
 * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
 */
public class Nest extends DefaultCell {
    /**
     * The amount of food in this nest.
     */
    int food;
    /**
     * Number of eggs in nest.
     */
    int num_eggs;
    /**
     * Energy required to create a nest.
     */
    public final static int NEST_COST = 100;
    /** 
     * Energy required to lay an egg in the nest.
     */
    public final static int EGG_COST   = 1000;
    
    Nest(Point point) {
    	super(point);
        food = NEST_COST;
        num_eggs = 0;
    }

    void addEnergy(int amount) {
        food += amount;
    }

    public int foodSupply() {
        return food;
    }

    void layEgg() {
        num_eggs++;
        food -= EGG_COST;
    }

    public int numEggs() {
        return num_eggs;
    }
}
